class Rating < ActiveRecord::Base
  belongs_to :rateable_object
  
  after_save :update_average
  
  def update_average
    self.rateable_object.update_average_score
  end
end
